	//验证用户名
	var username =/^[A-Za-z]{1}[A-Za-z0-9]{4,12}/;
	var password=/^(?=.*?[a-z)(?=.*>[A-Z])(?=.*?[0-9])[a-zA_Z0-9]{6,10}$/;
	  $(document).ready(function(){
		$("#userName").blur(function(){
			var Uname = $('#userName').val();
			//alert(Uname)
			if(username.test(Uname)){
				//alert(121231)
				$("#uName").attr("class","glyphicon glyphicon-ok");
				$("#uName").attr("glyphicon-ok","color:#009688");
				$("#uName").text("正确！").attr("style","color:#009688");
				$("#userName").click(function(){
 				 	$("#uName").text(" ");
 					$("#uName").attr("class"," ");
			})
			}else{
				$("#uName").attr("class","glyphicon glyphicon-remove");
				$("#uName").text("输入错误！").attr("style","color:#FF5722");
			             
 				$("#userName").click(function(){
 					$("#uName").attr("class"," ");
 				 	$("#uName").text("请输入4-16位的英文和数字(英文开头)").attr("style","color:#000");
			})
 		       }
		})
		// 验证密码
		$("#password1").blur(function(){
			var pwds = $('#password1').val();
			//alert(Uname)
			if(password.test(pwds)){
				//alert(121231)
				$("#Password").attr("class","glyphicon glyphicon-ok");
				$("#Password").attr("glyphicon-ok","color:#009688");
				$("#Password").text("正确！").attr("style","color:#009688");
				$("#password1").click(function(){
 				 	$("#Password").text(" ");
 					$("#Password").attr("class"," ");
			})
			}else{
				$("#Password").attr("class","glyphicon glyphicon-remove");
				$("#Password").text("输入错误！").attr("style","color:#FF5722");
			             
 				$("#password1").click(function(){
 					$("#Password").attr("class"," ");
 				 	$("#Password").text("请输入5-11位的英文和数字").attr("style","color:#000");
			})
 		       }
		})
		//确认密码
		
		$("#password2").blur(function(){
			var pwds1 = $('#password1').val();
			var pwds2 = $("#password2").val();
			//alert(pwds1==pwds2)
		if (pwds1==pwds2&!(pwds2=='')) {
			$("#Password2").attr("class","glyphicon glyphicon-ok");
				$("#Password2").attr("glyphicon-ok","color:#009688");
				$("#Password2").text("正确！").attr("style","color:#009688");
				$("#password1").click(function(){
 				 	$("#Password2").text(" ");
 					$("#Password2").attr("class"," ");
			})
			}else{
				$("#Password2").attr("class","glyphicon glyphicon-remove");
				$("#Password2").text("前后密码不一致！").attr("style","color:#FF5722");
			             
 				$("#password2").click(function(){
 					$("#Password2").attr("class"," ");
 				 	$("#Password2").text(" ");
			})
		}
		})
		//输入电话号
		var phone=/^1[3456789]\d{9}$/;
		$("#Phoneid").blur(function(){
			var Phone = $('#Phoneid').val();
			if(!(/^1[3456789]\d{9}$/.test(Phone))){
				$("#phoneID").attr("class","glyphicon glyphicon-remove");
				$("#phoneID").text("号码错误！").attr("style","color:#FF5722");
				$("#Phoneid").click(function(){
					$("#phoneID").attr("class"," ");
 				 	$("#phoneID").text("请输入11位的电话号码");					
			})
			}else{
				$("#phoneID").attr("glyphicon-ok","color:#009688");
				$("#phoneID").text("正确！").attr("style","color:#009688");
				$("#Phoneid").click(function(){
 					$("#phoneID").attr("class"," ");
 				 	$("#phoneID").text(" ");
			})
			}


		})

	})
		